Docker Installation
Remote server connection from Termius. The commands for the installation depend on the server's OS. Run this command into the Termius terminal to identify the server's OS.
cat /etc/os-release
The server OS is Ubuntu, so the from now on the commands to install Docker are meant for Ubuntu only.
- Update the package list
sudo apt update
- Install dependencies
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
- Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
- Add Docker's repository
This step is important so the latest official Docker version is installed.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Update the package list again
sudo apt update
- Start Docker
sudo systemctl start docker
- Enable Docker
sudo systemctl enable docker
- Verify Docker Version
docker --version
- Verify Docker Installation
docker run hello-world
If you see "Hello from Docker!" The installation is all done!